Skip to content

Conversation

@EvilOlaf
Copy link
Member

@EvilOlaf EvilOlaf commented Nov 10, 2025

Description

Same story as #8911

How Has This Been Tested?

  • Build for tinkerboard current

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • My changes generate no new warnings
  • Any dependent changes have been merged and published in downstream modules

Summary by CodeRabbit

Release Notes

  • New Features

    • Added audio codec driver for RK3228, RK3328 devices
    • Enabled hardware video acceleration (HEVC, RGA, IEP encoders)
    • Added overlay plane support for display
    • Added hardware cursor support for improved graphics
    • User-space GPIO memory access device
    • Support for 10-bit video formats
    • Added IR receiver and WiFi drivers
    • NAND/Flash storage support
  • Improvements

    • Enhanced thermal management and power domain handling
    • Improved USB and MMC stability
    • Better Bluetooth integration for wireless boards

@github-actions github-actions bot added 11 Milestone: Fourth quarter release size/large PR with 250 lines or more labels Nov 10, 2025
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Nov 10, 2025

Walkthrough

This comprehensive kernel patch set adds Armbian customizations and enhancements for Rockchip SoCs (RK3228, RK3288, RK3328, RK3399) including new drivers (RK3228 audio codec, RK3288 gpiomem, ESP8089/SSV6051 WiFi), display improvements (hardware cursor, 10-bit YUV modes), video codec support (HEVC decoding), DDR frequency scaling, device-tree configuration tuning, and numerous hardware-specific fixes across USB, MMC, audio, and networking subsystems.

Changes

Cohort / File(s) Summary
Audio Codec Driver - RK3228
sound/soc/codecs/rk3228_codec.*, sound/soc/codecs/Makefile, sound/soc/codecs/Kconfig, include/dt-bindings/clock/rk3228-cru.h, drivers/clk/rockchip/clk-rk3228.c, Documentation/devicetree/bindings/sound/rockchip,rk3228-codec.txt
New ASoC codec driver implementation for RK3228 with register maps, DAI definitions, lifecycle management, and integration into the SoC clock infrastructure.
GPIO Memory Access Driver - RK3288
drivers/char/rockchip/*, arch/arm/boot/dts/rockchip/rk3288*.dtsi
New character device driver enabling user-space mmap access to GPIO registers with DTS bindings and build configuration.
Bluetooth & Wireless - RTL8723BS & Broadcom
patch/kernel/archive/rockchip-6.12/patches.armbian/bt-*.patch, patch/kernel/archive/rockchip-6.12/patches.armbian/wifi-*.patch, patch/kernel/archive/rockchip-6.12/patches.armbian/driver-tinkerboard-alc4040-codec.patch
Bluetooth quirk adjustments, device-specific codecs, and board-level audio/RF configurations.
Display (DRM) Enhancements
drivers/gpu/drm/rockchip/*, drivers/gpu/drm/bridge/synopsys/dw-hdmi*.c, include/drm/bridge/dw_hdmi.h
Hardware cursor plane support, 10-bit YUV format support, per-plane color properties, HDMI/TMDS robustness improvements, and display architecture modernization.
Video Codec (V4L2/rkvdec)
drivers/staging/media/rkvdec/*, include/linux/videodev2.h
Multi-codec support (H.264, HEVC, VP9) with capability-aware format selection, 10-bit format extensions (NV15, NV20), hardware reset/QoS management, and Rockchip PM domain idle control.
USB/DWC2 Fixes
drivers/usb/dwc2/params.c, drivers/usb/dwc2/core.c, drivers/usb/host/xhci*.c, arch/arm/boot/dts/rockchip/rk322x.dtsi
Platform-specific parameter tuning (RK3228 no clock gating), host-mode timing fixes, peripheral mode wait delays, and reset property wiring in device trees.
MMC/SD Card Improvements
drivers/mmc/core/core.c, drivers/mmc/host/dw_mmc*.c
Power cycle recovery for Tinkerboard, enhanced signal voltage initialization sequencing, and reboot handling for SDMMC subsystem.
Clock & DDR Management
drivers/clk/rockchip/clk-rk3228.c, drivers/clk/rockchip/clk.h, include/dt-bindings/clock/rk3228-cru.h, include/soc/rockchip/rockchip_sip.h, drivers/devfreq/event/rockchip-dfi.c, drivers/devfreq/rk3228_dmc.c
Clock tree reorganization (composite clock variants, DDR clock gating), SIP v2 DDR rate control, DFI driver support (RK3228/RK3328), and full DMC DEVFREQ driver for RK3228 frequency scaling.
DMA Driver (PL330)
drivers/dma/pl330.c
Cyclic transfer support, interleaved DMA capabilities, microcode buffer expansion (256→512), power-down balancing, and cyclic descriptor completion semantics.
Device Tree Configuration
arch/arm/boot/dts/rockchip/rk*.dtsi, arch/arm/boot/dts/rockchip/rk3288-*.dtsi
Board-specific enablement (fan, HEVC, RGA, GPU), regulator tuning, pinctrl extensions (NAND, SPI, UART Bluetooth), thermal zone reordering, MMC alias fixes, and IEP/crypto node addition.
Infrared & Remote Controls
drivers/media/rc/rockchip-ir.c, drivers/media/rc/keymaps/rc-*.c, include/media/rc-map.h, drivers/media/rc/Makefile, drivers/media/rc/Kconfig
New Rockchip GPIO-based IR receiver driver with SIP/TEE integration and RK322x TV box remote keymaps (NEC protocol).
WiFi Drivers - Comprehensive
drivers/net/wireless/esp8089/, drivers/net/wireless/ssv6051/, drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c, drivers/media/platform/rockchip/iep/
Complete driver stacks for ESP8089 and SSV6051 with MAC80211 integration, firmware management, debugfs interfaces; brcmfmac AP6330 support and BCM43342 chip ID; IEP image enhancement driver framework.
Device Tree Binding & Configuration Files
include/dt-bindings/memory/rockchip,rk322x.h, include/dt-bindings/clock/rockchip-ddr.h, include/soc/rockchip/rk3228_grf.h, include/soc/rockchip/rk3328_grf.h, Documentation/devicetree/bindings/media/rockchip-iep.yaml, Documentation/devicetree/configfs-overlays.txt
New binding headers for DDR/memory timing, GRF register definitions, media device bindings, and ConfigFS device-tree overlay interface documentation.
Miscellaneous Fixes & Utilities
drivers/mmc/core/, drivers/net/ethernet/arc_emac*.c, drivers/dma/pl330.c, sound/soc/codecs/spidev.c, drivers/media/platform/rkvdec/, drivers/of/configfs.c, drivers/pmdomain/rockchip/pm-domains.c, drivers/regulator/act8865-regulator.c
RTL8201F PHY support, SPDIF DMA burst optimization, spidev board ID additions, regulator restart handlers, Rockchip PM domain ignore-power flags, and ConfigFS device-tree overlay support.

Sequence Diagram(s)

sequenceDiagram
    participant User as User Application
    participant V4L2 as V4L2 Core
    participant rkvdec as rkvdec Driver
    participant Variant as Variant Select
    participant HW as Hardware (H.264/HEVC/VP9)
    
    Note over User,HW: Multi-Codec Format Selection Flow (New)
    User->>V4L2: enum_output_fmt()
    V4L2->>rkvdec: rkvdec_enum_output_fmt()
    rkvdec->>Variant: Check device->capabilities
    alt HEVC Capable
        Variant->>rkvdec: Include HEVC descriptors
    else H.264 Only
        Variant->>rkvdec: Include H.264 descriptors only
    end
    rkvdec->>V4L2: Return capability-filtered formats
    V4L2->>User: Format list
    
    Note over User,HW: Decoding with Reset Management (New)
    User->>V4L2: Start streaming
    V4L2->>rkvdec: rkvdec_device_run()
    rkvdec->>HW: Check reset_mask
    alt Reset Required
        rkvdec->>rkvdec: rockchip_pmu_idle_request(true)
        rkvdec->>HW: Toggle reset line
        rkvdec->>rkvdec: rockchip_pmu_idle_request(false)
    end
    rkvdec->>HW: Start decoding
    HW->>rkvdec: IRQ (job complete)
    rkvdec->>V4L2: Job finished callback
    V4L2->>User: Frame ready
Loading
sequenceDiagram
    participant DRM as DRM Core
    participant VOP as VOP Driver
    participant Cursor as Cursor Plane
    participant Primary as Primary Plane
    participant HW as Hardware
    
    Note over DRM,HW: Hardware Cursor Plane Support (New)
    DRM->>VOP: vop_create_crtc()
    alt VOP_FEATURE_SPECIAL_CURSOR_PLANE
        VOP->>Cursor: Create cursor_plane with cursor_plane_helper_funcs
        VOP->>Primary: Create primary_plane with plane_helper_funcs
    else Legacy
        VOP->>Primary: Create primary plane (old path)
    end
    
    Note over DRM,HW: Cursor Update Path
    DRM->>Cursor: drm_plane_helper_update()
    Cursor->>Cursor: vop_cursor_atomic_check()
    Cursor->>Cursor: vop_cursor_atomic_update()
    Cursor->>HW: Write hwc_size, position registers
    HW->>HW: Hardware cursor rendered
    
    Note over DRM,HW: Primary/Overlay Unaffected
    DRM->>Primary: drm_plane_helper_update()
    Primary->>Primary: plane_helper_funcs (unchanged)
Loading
sequenceDiagram
    participant Boot as Bootloader/Kernel
    participant ClkMgr as Clock Manager
    participant DMC as DMC DEVFREQ
    participant SIP as Rockchip SIP/ATF
    participant DDR as DDR Memory
    
    Note over Boot,DDR: RK3228 DDR Frequency Scaling (New)
    Boot->>ClkMgr: Initialize clocks (SIP v2 path)
    ClkMgr->>DMC: Register dmc devfreq device
    DMC->>DMC: Set OPP table from DTS
    
    Note over Boot,DDR: Load Monitoring
    DMC->>DDR: Read DFI load statistics
    DMC->>DMC: Compare load vs thresholds
    
    alt High Load
        DMC->>SIP: ROCKCHIP_SIP_CONFIG_DRAM_POST_SET_RATE (higher freq)
        SIP->>DDR: Update DDR freq/voltage
    else Low Load
        DMC->>SIP: ROCKCHIP_SIP_CONFIG_DRAM_POST_SET_RATE (lower freq)
        SIP->>DDR: Reduce DDR freq/voltage
    end
    DDR->>ClkMgr: Frequency changed
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~75 minutes

Key areas requiring careful attention:

  • WiFi Drivers (esp8089, ssv6051): ~2,500+ lines each with MAC80211 integration, firmware management, debugfs interfaces, and vendor-specific commands. Complex state machines and protocol handling. Requires deep understanding of Linux wireless stack.

  • rkvdec Video Codec Enhancements: Public API changes to struct rkvdec_coded_fmt_ops and rkvdec_ctx, multi-codec capability filtering, and Rockchip PM domain integration (rockchip_pmu_idle_request EXPORT_SYMBOL). Verify backward compatibility and capability negotiation logic.

  • Hardware Cursor Plane (DRM): Introduces new helper_funcs path selection, struct vop_win_phy.hwc_size field, and VOP_FEATURE_SPECIAL_CURSOR_PLANE macro. Verify plane creation logic, conditional compilation, and interaction with existing primary/overlay planes across RK3288/RK3228 variants.

  • RK3228 DMC DEVFREQ Driver: New devfreq governor with OPP table, DFI load monitoring, and SIP v2 DDR frequency control. Verify DDR timing correctness, thermal stability, and interactions with PM domain idle requests.

  • DMA PL330 Cyclic & Interleaved Transfers: Significant logic changes to descriptor lifecycle, cyclic vs. non-cyclic completion semantics (dma_pl330_rqcb behavior), per-descriptor cyclic state, and new interleaved transfer path with extended dma_interleaved_template. Public API surface changes require compatibility verification.

  • Clock Tree Reorganization (RK3228): DDR clock naming changes (pclk_ddrupctl → pclk_ddr_upctl), composite clock replacements (COMPOSITE_NODIV → COMPOSITE_DIV_OFFSET for MMC), and SIP v2 macro definitions. Verify all clock parents, muxes, and gate assignments are consistent.

  • Bluetooth & UART Integration: rtl8723bs quirk disable (commented-out HCI_QUIRK_INVALID_BDADDR), Tinkerboard Bluetooth GPIO wiring, and UART pinctrl additions. Verify functional impact on device detection and communication.

  • Miscellaneous Public Exports: EXPORT_SYMBOL(mm_trace_rss_stat) signature change (removed count parameter), rockchip_pmu_idle_request (new EXPORT_SYMBOL), and multiple new RC keymaps. Check for module dependency correctness.

Suggested reviewers

  • paolosabatino
  • JohnTheCoolingFan
  • SuperKali
  • TheSnowfield
  • prahal
  • igorpecovnik
  • krachlatte
  • clee
  • joekhoobyar
  • brentr
  • catalinii
  • amazingfate
  • HeyMeco
  • rpardini
  • Tonymac32

Poem

🐰 Hops of joy through patches grand,
Rockchip drivers across the land,
Cursors flying, codecs soar,
WiFi drivers and so much more—
Six-point-twelve now runs so sweet,
Armbian's kernel beat completes! 🥕✨

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main objective: reorganizing and modernizing Rockchip kernel patches for the current branch, which aligns with the extensive patch updates shown in the changeset.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions github-actions bot added Needs review Seeking for review Hardware Hardware related like kernel, U-Boot, ... Patches Patches related to kernel, U-Boot, ... labels Nov 10, 2025
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (27)
patch/kernel/archive/rockchip-6.12/patches.armbian/general-fix-reboot-from-kwiboo.patch (1)

60-66: Fix indentation to use tabs instead of spaces.

The added lines use space indentation instead of tabs, violating kernel coding style requirements. The Linux kernel requires tabs for indentation (8-character width).

Apply this fix to use proper tab indentation:

-        mmc_set_initial_signal_voltage(host);
-
-        /*
-         * This delay should be sufficient to allow the power supply
-         * to reach the minimum voltage.
-         */
-        mmc_delay(host->ios.power_delay_ms);
+	mmc_set_initial_signal_voltage(host);
+
+	/*
+	 * This delay should be sufficient to allow the power supply
+	 * to reach the minimum voltage.
+	 */
+	mmc_delay(host->ios.power_delay_ms);
patch/kernel/archive/rockchip-6.12/patches.armbian/general-add-restart-handler-for-act8846.patch (1)

59-65: Unregister the restart handler on driver teardown.

You register act8846_restart_handler, but the driver never calls unregister_restart_handler() in its remove/shutdown paths. If the device is unbound or the module is unloaded, the notifier will keep firing with a dangling act8865_i2c_client, leading to crashes on the next reboot attempt. The kernel reboot API expects register/unregister to be paired.(kernel.googlesource.com)

Please mirror the registration with an unregister in act8865_pmic_remove() (and clear act8865_i2c_client), e.g.:

 static int act8865_pmic_remove(struct i2c_client *client)
 {
+	if (type == ACT8846)
+		unregister_restart_handler(&act8846_restart_handler);
+	act8865_i2c_client = NULL;
 	...
 }
patch/kernel/archive/rockchip-6.12/patches.armbian/general-rk322x-gpio-ir-driver.patch (1)

232-304: Fix PWM channel base handling

For any device tree that sets pwm-id to something other than 0, we still poke channel 0’s registers. rockchip_pwm_hw_init()/rockchip_pwm_hw_stop() never add the per-channel stride, so the capture logic never arms the PWM that Trust OS will look at. On top of that, rockchip_pwm_int_ctrl() subtracts (0x10 * pwm_id) from the ioremapped base; for pwm-id = 1 this points before the mapped resource, so we end up reading/writing unmapped memory. In both cases the virtual power-off wake path simply can’t fire on boards wired to PWM1/2/3 (e.g. Tinkerboard).

Please compute the per-channel base via the stride and use the original controller base for the common register, instead of subtracting the offset. A minimal fix would look like this:

@@
-static void rockchip_pwm_int_ctrl(struct rockchip_rc_dev *gpio_dev, bool enable)
-{
-	void __iomem *pwm_base = gpio_dev->pwm_base;
-	struct device *dev = &gpio_dev->rcdev->dev;
-	int pwm_id = gpio_dev->pwm_id;
-	void __iomem *reg_int_ctrl;
+static void rockchip_pwm_int_ctrl(struct rockchip_rc_dev *gpio_dev, bool enable)
+{
+	void __iomem *pwm_base = gpio_dev->pwm_base;
+	struct device *dev = &gpio_dev->rcdev->dev;
+	void __iomem *reg_int_ctrl;
 	int val;
 
-	reg_int_ctrl= pwm_base - (0x10 * pwm_id) + PWM_REG_INT_EN;
+	reg_int_ctrl = pwm_base + PWM_REG_INT_EN;
@@
-static int rockchip_pwm_hw_init(struct rockchip_rc_dev *gpio_dev)
-{
-	void __iomem *pwm_base = gpio_dev->pwm_base;
+static int rockchip_pwm_hw_init(struct rockchip_rc_dev *gpio_dev)
+{
+	void __iomem *chan_base = gpio_dev->pwm_base + gpio_dev->pwm_id * 0x10;
@@
-	val = readl_relaxed(pwm_base + PWM_REG_CTRL);
+	val = readl_relaxed(chan_base + PWM_REG_CTRL);
@@
-	rockchip_pwm_int_ctrl(gpio_dev, true);
+	rockchip_pwm_int_ctrl(gpio_dev, true);
@@
-	val = readl_relaxed(pwm_base + PWM_REG_CTRL);
+	val = readl_relaxed(chan_base + PWM_REG_CTRL);

and apply the same chan_base adjustment inside rockchip_pwm_hw_stop(). This ensures we touch the correct PWM channel and stops us from accessing MMIO outside the mapped region.

patch/kernel/archive/rockchip-6.12/patches.libreelec/linux-0011-v4l2-from-list.patch (1)

338-389: Fix valid_fmt when non-SPS controls arrive

rkvdec_valid_fmt() now delegates every control to ops->valid_fmt(), but rkvdec_h264_valid_fmt() unconditionally reads ctrl->p_new.p_h264_sps. For any other control (PPS, scaling matrix, etc.) the union holds different data, so we either dereference garbage or return 0. The subsequent comparison in rkvdec_try_ctrl() (ctx->valid_fmt && ctx->valid_fmt != rkvdec_valid_fmt(...)) will then reject those controls, breaking the decode pipeline, and in practice we can even trip UB by touching the wrong pointer. Mainline patches guard this helper with if (ctrl->id != V4L2_CID_STATELESS_H264_SPS) return 0; before accessing SPS-specific fields. Please add the same check (or similar logic in rkvdec_valid_fmt()) so that only SPS updates influence the negotiated format. (patchew.org)

Also applies to: 500-548

patch/kernel/archive/rockchip-6.12/patches.libreelec/linux-1000-drm-rockchip.patch (1)

1207-1275: Restore vop_crtc_mode_valid symbol name

Line [1207]: this hunk renames the CRTC mode validator to vop_crtc_mode_valid5, but vop_crtc_helper_funcs later in this file still binds .mode_valid = vop_crtc_mode_valid. We now reference a function that no longer exists and the driver fails to build. Please keep the original symbol name (or update every reference) so the object links again.

patch/kernel/archive/rockchip-6.12/patches.armbian/general-rockchip-various-fixes.patch (4)

32-42: Fix typo in crypto controller node name.

The node name contains a typo: cypto-controller should be crypto-controller.

Apply this diff to fix the typo:

-	crypto: cypto-controller@100a0000 {
+	crypto: crypto-controller@100a0000 {
 		compatible = "rockchip,rk3288-crypto";

112-137: GPU node status implicitly changed from disabled to enabled.

The original GPU node had status = "disabled"; which has been removed. By removing this line, the GPU is now implicitly enabled by default. This is a significant behavioral change that should be explicitly documented or reconsidered.

If the GPU should remain disabled by default (common for device tree SoC dtsi files), restore the status property:

 		operating-points-v2 = <&gpu_opp_table>;
 		#cooling-cells = <2>; /* min followed by max */
+		status = "disabled";
 	};

If enabling the GPU by default is intentional, please document this change in the commit message.


453-499: Add error handling for initial page read.

The function reads the current page register at line 458 but doesn't check for read errors. If this read fails, the function will proceed with an invalid page value and fail to restore the correct page on exit.

Apply this diff to add error checking:

 static int arc_emac_rtl8201f_phy_fixup(struct phy_device *phydev)
 {
 	unsigned int reg, curr_pg;
 	int err = 0;
 
-	curr_pg = phy_read(phydev, RTL_8201F_PG_SELECT_REG);
+	curr_pg = phy_read(phydev, RTL_8201F_PG_SELECT_REG);
+	if (curr_pg < 0)
+		return curr_pg;
+
 	err = phy_write(phydev, RTL_8201F_PG_SELECT_REG, 4);

70-78: Fix uart2 pinctrl reference from uart21_xfer back to uart2_xfer.

The change from uart2_xfer to uart21_xfer introduces a broken reference. uart21_xfer is not defined anywhere in the rockchip-6.12 patches. The original uart2_xfer exists in the base device tree and should be retained, or if an alternative pinmux is needed, verify that the target configuration is actually defined.

@@ -350,7 +365,7 @@ uart2: serial@11030000 {
 		clocks = <&cru SCLK_UART2>, <&cru PCLK_UART2>;
 		clock-names = "baudclk", "apb_pclk";
 		pinctrl-names = "default";
-		pinctrl-0 = <&uart2_xfer>;
+		pinctrl-0 = <&uart2_xfer>;
 		reg-shift = <2>;
 		reg-io-width = <4>;
 		status = "disabled";
patch/kernel/archive/rockchip-6.12/patches.armbian/wifi-driver-esp8089.patch (1)

1700-1707: Avoid unregistering inside the module init path

esp_sdio_init() registers the driver, sleeps for one second, unregisters it again, sleeps, and finally re-registers it. This “double probe” dance forcefully detaches every SDIO function on the bus (not just esp8089), introduces a 1 s boot delay, and opens races with any other SDIO driver that might already be bound. On systems with unrelated SDIO peripherals this will manifest as spurious disconnects or outright probe failures. Please restructure the firmware bootstrap so it happens within a single probe cycle—e.g. handle the two-phase load from within esp_sdio_probe() or use mmc_sw_reset() where appropriate—rather than unregistering the entire driver from the init routine.

patch/kernel/archive/rockchip-6.12/patches.libreelec/linux-2001-v4l2-wip-iep-driver.patch (3)

438-440: Fix the always-true field-select macro

IEP_DEIN_OUT_MODE_1FRM_TOP_FIELD() lacks a comparison for the second condition, so the expression is always true (non-zero constant). That forces the hardware into the “top field” path even when the mode should select a bottom field, breaking single-frame deinterlace output. Please compare m against IEP_DEIN_MODE_I2O1T explicitly.

-#define IEP_DEIN_OUT_MODE_1FRM_TOP_FIELD(m) (m == IEP_DEIN_MODE_I4O1T || IEP_DEIN_MODE_I2O1T \
+#define IEP_DEIN_OUT_MODE_1FRM_TOP_FIELD(m) ((m == IEP_DEIN_MODE_I4O1T) || \
+					     (m == IEP_DEIN_MODE_I2O1T) ? 1 : 0)

1368-1387: Abort probe when clock parsing fails

When iep_parse_dt() returns an error (e.g., failed devm_clk_get()), the probe just logs it and keeps going. The driver then stores ERR_PTR()s in iep->axi_clk/ahb_clk, and later runtime-pm callbacks will dereference those handles, oopsing the kernel. Please bail out on the failure path (return ret or jump to the cleanup label) before touching clocks, IRQs, or registering the device.

 	ret = iep_parse_dt(iep);
-	if (ret)
-		dev_err(&pdev->dev, "Unable to parse OF data\n");
+	if (ret) {
+		dev_err(&pdev->dev, "Unable to parse OF data (%d)\n", ret);
+		goto err_parse;
+	}
 	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
@@
-err_put_clk:
+err_put_clk:
 	pm_runtime_dont_use_autosuspend(iep->dev);
 	pm_runtime_disable(iep->dev);
 return ret;
+
+err_parse:
+	return ret;

1783-1796: Fix rk3288 IEP unit address typo

The rk3288 IEP node is spelled iep@ff90000, but the reg base is 0xff900000. DTC will flag this as a unit-address mismatch, and some tooling rejects it outright. Please rename the node to iep@ff900000 (and likewise for its iep_mmu child if needed) so the unit address and register base align.

patch/kernel/archive/rockchip-6.12/patches.armbian/mmc-tinkerboard-sdmmc-reboot-fix.patch (1)

95-101: Prevent UAF by using a devm-managed restart handler

register_restart_handler() is deprecated and, as used here, leaves a live notifier pointing at data after the platform device unbinds. Because data is devm_kzalloc()’d, the devres core frees it on remove, so the next reboot path dereferences freed memory and can BUG — the exact pattern the kernel community has been phasing out in favour of devm-managed sys-off helpers. Please switch to a devm-backed registration (e.g. devm_register_restart_handler() or devm_add_action_or_reset() around unregister_restart_handler()) and handle the error path so the handler isn’t left registered on failure. (lore-kernel.gnuweeb.org)

+static void dw_mci_rockchip_unregister_restart(void *nb)
+{
+	unregister_restart_handler(nb);
+}
+
 ... 
-	register_restart_handler(&data->reset_nb);
+	ret = register_restart_handler(&data->reset_nb);
+	if (ret) {
+		dev_err(&pdev->dev, "failed to register restart handler: %d\n",
+			ret);
+		return;
+	}
+
+	if (devm_add_action_or_reset(&pdev->dev,
+				     dw_mci_rockchip_unregister_restart,
+				     &data->reset_nb))
+		return;
patch/kernel/archive/rockchip-6.12/patches.armbian/rk322x-dmc-driver-04-driver.patch (1)

906-946: Balance the devfreq-event enable/disable lifecycle.

devfreq_event_enable_edev() bumps the DFI driver’s usecount. If rk3228_dmc_init() or rk3228_devfreq_init() bails out, or when the driver is later removed, we never call the matching devfreq_event_disable_edev(). That leaves the event device permanently enabled, leaking the usecount and preventing clean reprobes/unloads. Please unwind the enable on every failure path and in .remove(). One way is to funnel the error exits through a shared label and only disable when the enable actually ran.

@@ static int rk3228_dmc_probe(struct platform_device *pdev)
-	ret = rk3228_dmc_init(pdev, data);
-	if (ret)
-		return ret;
+	ret = rk3228_dmc_init(pdev, data);
+	if (ret)
+		goto err_disable_event;
 
 	ret = rk3228_devfreq_init(data);
 	if (ret)
-		return ret;
+		goto err_disable_event;
@@
 	return 0;
+
+err_disable_event:
+	devfreq_event_disable_edev(data->edev);
+	return ret;
 }
 
@@ static void rk3228_dmc_remove(struct platform_device *pdev)
 	struct rk3228_dmc *rdev = dev_get_drvdata(&pdev->dev);
 
+	if (rdev->devfreq.devfreq)
+		devfreq_event_disable_edev(rdev->edev);
+
 	rk3228_dmc_sysfs_remove(&pdev->dev);
patch/kernel/archive/rockchip-6.12/patches.armbian/driver-rk3288-gpiomem.patch (2)

430-446: Compile fix: pass module owner to class_create()

On 6.12 the helper macro still expects the owning module as the first parameter. Calling class_create(DEVICE_NAME) won't compile. Please switch to the two-argument form so this driver builds.

-	rk3288_gpiomem_class = class_create(DEVICE_NAME);
+	rk3288_gpiomem_class = class_create(THIS_MODULE, DEVICE_NAME);

458-470: Avoid dereferencing inst after it’s freed or never allocated

If kzalloc() fails, inst is NULL and we crash in the error log. For later failures we free inst then still touch it, which is a UAF. Use the existing dev variable for logging and clear the global pointer before returning.

failed_get_resource:
	kfree(inst);
	inst = NULL;
failed_inst_alloc:
-	dev_err(inst->dev, "could not load rk3288_gpiomem");
+	dev_err(dev, "could not load rk3288_gpiomem");
patch/kernel/archive/rockchip-6.12/patches.armbian/driver-tinkerboard-alc4040-codec.patch (2)

77-79: Fix code style: missing space after if keyword.

The conditional statement is missing a space after the if keyword, which violates standard C coding style.

Apply this diff:

-	if(USB_ID_VENDOR(chip->usb_id) == 0x0bda &&
+	if (USB_ID_VENDOR(chip->usb_id) == 0x0bda &&
 		USB_ID_PRODUCT(chip->usb_id) == 0x481a) {
 			strlcat(card->shortname, " OnBoard", sizeof(card->shortname));
 	}

81-81: Remove trailing whitespace.

Line 81 contains trailing whitespace that should be removed to maintain code cleanliness.

patch/kernel/archive/rockchip-6.12/patches.armbian/drm-rk322x-plane-overlay.patch (1)

95-108: Window 1 is still wired to WIN0 registers

rk3228_win1_data is supposed to drive the second window (base 0x40), yet every register entry still dereferences the WIN0 register block. That means programming the overlay plane will clobber WIN0 instead of WIN1, so the "overlay" plane never comes up correctly. Please retarget these VOP_REG definitions to the WIN1 register set.

 static const struct vop_win_phy rk3228_win1_data = {
-	.enable = VOP_REG(RK3288_WIN0_CTRL0, 0x1, 0),
-	.format = VOP_REG(RK3288_WIN0_CTRL0, 0x7, 1),
-	.rb_swap = VOP_REG(RK3288_WIN0_CTRL0, 0x1, 12),
-	.act_info = VOP_REG(RK3288_WIN0_ACT_INFO, 0x1fff1fff, 0),
-	.dsp_info = VOP_REG(RK3288_WIN0_DSP_INFO, 0x0fff0fff, 0),
-	.dsp_st = VOP_REG(RK3288_WIN0_DSP_ST, 0x1fff1fff, 0),
-	.yrgb_mst = VOP_REG(RK3288_WIN0_YRGB_MST, 0xffffffff, 0),
-	.uv_mst = VOP_REG(RK3288_WIN0_CBR_MST, 0xffffffff, 0),
-	.yrgb_vir = VOP_REG(RK3288_WIN0_VIR, 0x3fff, 0),
-	.uv_vir = VOP_REG(RK3288_WIN0_VIR, 0x3fff, 16),
-	.src_alpha_ctl = VOP_REG(RK3288_WIN0_SRC_ALPHA_CTRL, 0xff, 0),
-	.dst_alpha_ctl = VOP_REG(RK3288_WIN0_DST_ALPHA_CTRL, 0xff, 0),
-	.channel = VOP_REG(RK3288_WIN0_CTRL2, 0xff, 0),
+	.enable = VOP_REG(RK3288_WIN1_CTRL0, 0x1, 0),
+	.format = VOP_REG(RK3288_WIN1_CTRL0, 0x7, 1),
+	.rb_swap = VOP_REG(RK3288_WIN1_CTRL0, 0x1, 12),
+	.act_info = VOP_REG(RK3288_WIN1_ACT_INFO, 0x1fff1fff, 0),
+	.dsp_info = VOP_REG(RK3288_WIN1_DSP_INFO, 0x0fff0fff, 0),
+	.dsp_st = VOP_REG(RK3288_WIN1_DSP_ST, 0x1fff1fff, 0),
+	.yrgb_mst = VOP_REG(RK3288_WIN1_YRGB_MST, 0xffffffff, 0),
+	.uv_mst = VOP_REG(RK3288_WIN1_CBR_MST, 0xffffffff, 0),
+	.yrgb_vir = VOP_REG(RK3288_WIN1_VIR, 0x3fff, 0),
+	.uv_vir = VOP_REG(RK3288_WIN1_VIR, 0x3fff, 16),
+	.src_alpha_ctl = VOP_REG(RK3288_WIN1_SRC_ALPHA_CTRL, 0xff, 0),
+	.dst_alpha_ctl = VOP_REG(RK3288_WIN1_DST_ALPHA_CTRL, 0xff, 0),
+	.channel = VOP_REG(RK3288_WIN1_CTRL2, 0xff, 0),
 };
patch/kernel/archive/rockchip-6.12/patches.armbian/wifi-ath9k-no-bulk-EP3-EP4.patch (1)

124-131: Keep the URB context pointing at struct hif_usb_rx_buf

ath9k_hif_usb_reg_in_cb() dereferences the completion context as a struct hif_usb_rx_buf. After this change we now submit the URB with skb instead, so the callback will treat an sk_buff pointer as an rx_buf, corrupt memory, and eventually blow up. Please keep passing rx_buf as before.

-				  ath9k_hif_usb_reg_in_cb, skb);
+				  ath9k_hif_usb_reg_in_cb, rx_buf);
patch/kernel/archive/rockchip-6.12/patches.armbian/driver-rk322x-audio-codec.patch (2)

146-155: Add the gpio consumer header

The driver uses struct gpio_desc and devm_gpiod_get_optional(), but <linux/gpio/consumer.h> isn’t included. Without it the build fails because struct gpio_desc and the function prototypes are undefined.

 #include <linux/device.h>
 #include <linux/delay.h>
 #include <linux/of.h>
 #include <linux/of_gpio.h>
+#include <linux/gpio/consumer.h>

584-592: Handle all devm_clk_get() failures

Only treating -EPROBE_DEFER as an error leaves every other failure path returning an ERR_PTR. We then feed that into clk_prepare_enable(), which will explode the first time a board lacks “mclk” or it’s renamed. Please do a full IS_ERR() check and propagate the error code.

-	rk3228->mclk = devm_clk_get(&pdev->dev, "mclk");
-	if (PTR_ERR(rk3228->mclk) == -EPROBE_DEFER)
-		return -EPROBE_DEFER;
+	rk3228->mclk = devm_clk_get(&pdev->dev, "mclk");
+	if (IS_ERR(rk3228->mclk))
+		return PTR_ERR(rk3228->mclk);
patch/kernel/archive/rockchip-6.12/patches.armbian/drm-rockchip-hardware-cursor.patch (2)

200-205: Fix the cursor size validation logic.

The condition allows crtc_w == 0 to pass validation, but line 109 in vop_cursor_atomic_update performs (new_state->crtc_w >> 5) - 1, which would underflow when crtc_w == 0, resulting in hwc_size = 0xFFFFFFFF. Either reject zero-sized cursors here or handle the zero case explicitly in the update function.

Apply this diff to reject zero-sized cursors:

-	if (new_plane_state->crtc_w != 0 &&
-	    new_plane_state->crtc_w != 32 &&
+	if (new_plane_state->crtc_w != 32 &&
 	    new_plane_state->crtc_w != 64 &&
 	    new_plane_state->crtc_w != 96 &&
 	    new_plane_state->crtc_w != 128)

90-106: Consider unconditionally enabling alpha for cursor planes.

The alpha blending configuration is only enabled when win_index > 0, but dedicated hardware cursor planes typically require alpha compositing regardless of their index. Since cursors inherently need transparency support, consider enabling alpha unconditionally for cursor planes or verifying that cursor planes will never have win_index == 0.

Apply this diff to unconditionally enable alpha for cursor planes:

-		if (fb->format->has_alpha && win_index > 0) {
+		if (fb->format->has_alpha) {
 			VOP_WIN_SET(vop, win, dst_alpha_ctl,
 				DST_FACTOR_M0(ALPHA_SRC_INVERSE));
patch/kernel/archive/rockchip-6.12/patches.armbian/general-pl330-02-add-support-for-interleaved-transfers.patch (1)

137-214: Guard nump before using it

xt->nump is a brand-new field in struct dma_interleaved_template; every existing caller will leave it at the default zero unless we update all sites. As written, we multiply and divide by nump immediately afterward (period_bytes = size * nump; and for (i = 0; i < numf / nump; i++)), so any zero value triggers a divide-by-zero fault in the kernel and creates zero-length descriptors. Please establish a non-zero default (e.g., treat zero as 1) before the arithmetic so legacy users keep working.

-	nump = xt->nump;
-	numf = xt->numf;
+	nump = xt->nump ? xt->nump : 1;
+	numf = xt->numf;
 
-	if (flags & DMA_PREP_REPEAT && (!nump || (numf % nump)))
+	if (flags & DMA_PREP_REPEAT && (numf % nump))
 		return NULL;
@@
-	for (i = 0; i < numf / nump; i++) {
+	for (i = 0; i < numf / nump; i++) {
patch/kernel/archive/rockchip-6.12/patches.libreelec/linux-1001-v4l2-rockchip.patch (1)

295-304: Make the reset array mandatory here.

devm_reset_control_array_get(&pdev->dev, false, true) treats the reset array as optional, so a DT missing resets will hand back NULL and all subsequent reset_control_assert/deassert calls quietly no-op. That contradicts the new binding where resets/reset-names are required, and it means the error-path hard reset never runs—exactly the situation this series is trying to fix. Please drop the optional=true (or use the non-optional helper) so probe fails when the resets are absent. (android.googlesource.com)

🧹 Nitpick comments (21)
patch/kernel/archive/rockchip-6.12/patches.armbian/ir-keymap-rk322x-box.patch (1)

40-77: Optional: Consider removing empty comment and documenting F-key mappings.

The empty comment block (lines 40-42) could be removed or filled with a brief description of the keymap. Additionally, the F1-F6 key mappings might benefit from a comment explaining their intended function on RK322x TV box remotes, as these are less self-explanatory than standard media keys.

patch/kernel/archive/rockchip-6.12/patches.armbian/wifi-driver-ssv6051.patch (1)

1-10: Consider the maintenance burden of large monolithic driver patches.

This 49k-line patch adds the entire SSV6051 driver as a single change, making it difficult to review, bisect, or selectively apply. While this may be acceptable for archived/legacy kernels, consider whether:

  • Splitting into logical modules (HCI, SDIO, MAC layer) would improve reviewability
  • The driver could leverage upstream wireless drivers (e.g., cfg80211/mac80211) more directly
  • This is the only way to support SSV6051 on Rockchip, or if alternatives exist

For an archive kernel (6.12), this approach may be justified if no upstream driver exists, but document the rationale.

patch/kernel/archive/rockchip-6.12/patches.armbian/ir-keymap-xt-q8l-v10.patch (2)

38-40: Remove the empty comment block.

This multi-line comment contains no content and serves no purpose. Either add meaningful documentation about the keymap or remove the empty comment entirely.

Apply this diff to remove the empty comment:

-/*
-
-*/
-
 static struct rc_map_table xt_q8l_v10[] = {

42-78: Remove whitespace-only lines.

Lines 43 and 78 appear to contain only whitespace characters (likely tabs). These serve no purpose and should be removed for cleaner code.

Apply this diff to clean up the whitespace:

 static struct rc_map_table xt_q8l_v10[] = {
-	
 	{ 0xcc1d11, KEY_ENTER },
 	{ 0xcc1d00, KEY_POWER },
 	...
 	{ 0xcc1d0d, KEY_F4 },
-	
 };
patch/kernel/archive/rockchip-6.12/patches.armbian/general-dwc2-fix-wait-peripheral.patch (1)

18-19: Consider polling instead of fixed delay.

The fixed 10ms sleep may not be sufficient across all platforms or conditions. Patch general-dwc2-fix-wait-time.patch in this same PR uses a polling approach with timeout for a similar timing issue in host mode. For consistency and robustness, consider implementing a polling loop that checks a relevant status register rather than relying on a fixed delay.

patch/kernel/archive/rockchip-6.12/patches.armbian/general-dwc2-fix-rk3288-reset-on-wake-quirk.patch (1)

14-19: Verify removal doesn't break RK3288 functionality.

The patch removes no_clock_gating = true from RK3288 parameters but provides no explanation for why this quirk is no longer needed. The dwc2_set_rk_params function applies to all Rockchip platforms, so this change could have broader impact.

Please verify:

  1. Has this been tested on RK3288 hardware?
  2. Why was this quirk originally needed and why is it safe to remove now?
  3. Does removing this break any existing functionality or is it fixing a specific issue?

Consider adding a commit message description explaining the rationale for this change.

patch/kernel/archive/rockchip-6.12/patches.armbian/general-dwc2-fix-wait-time.patch (1)

34-53: Polling logic is correct and well-implemented.

The polling approach is appropriate: checking GOTGCTL_CONID_B every 20ms for up to 200ms total. The logic correctly waits for the bit to clear (transition from device mode to host mode).

Minor enhancement: consider including the register value in the error message for easier debugging:

 			if (count > 10)
-				dev_err(hsotg->dev,
-					"Waiting for Host Mode timed out");
+				dev_err(hsotg->dev,
+					"Waiting for Host Mode timed out (GOTGCTL=0x%08x)",
+					dwc2_readl(hsotg, GOTGCTL));
patch/kernel/archive/rockchip-6.12/patches.armbian/general-fix-reboot-from-kwiboo.patch (1)

1-48: Subject line doesn't match the actual change.

The subject "Add simpler reboot code" is misleading. The patch modifies MMC power-off timing by adding voltage initialization and delays, not reboot-specific code. Consider updating the subject to reflect the actual changes, such as "mmc: Add voltage initialization and delay during power-off" or "mmc: Fix power-off timing for Rockchip platforms."

This would improve clarity for future maintenance and help others understand the patch's purpose without examining the diff.

patch/kernel/archive/rockchip-6.12/patches.armbian/clk-rk322x-composite-mmc-clk.patch (1)

1-8: Consider a more descriptive commit message.

The subject line "better handle mmc/sdio clocks" is somewhat vague. The actual change consolidates clock definitions from a COMPOSITE_NODIV + DIV pattern to a single COMPOSITE_DIV_OFFSET macro. A more specific subject like "rk322x: consolidate MMC/SDIO clock definitions" would better describe the refactoring.

patch/kernel/archive/rockchip-6.12/patches.armbian/general-rockchip-various-fixes.patch (8)

462-497: Consider using usleep_range instead of mdelay.

The function uses mdelay(10) multiple times, which is a busy-wait delay that blocks the CPU. Since this code runs during PHY initialization (not in atomic context), usleep_range() would be more appropriate and CPU-friendly.

Replace all mdelay(10) calls with:

-	mdelay(10);
+	usleep_range(10000, 11000);

This allows the CPU to sleep during the delay rather than busy-waiting.


465-469: Simplify bitwise operation for clarity.

The EEE disable operation uses multiple ~ operators with & which is harder to read. This can be simplified using a single mask.

Apply this diff to improve readability:

 	/* disable EEE */
 	reg = phy_read(phydev, RTL_8201F_PG4_EEE_REG);
-	reg &=  ~RTL_8201F_PG4_EEE_RX_QUIET_EN &
-		~RTL_8201F_PG4_EEE_TX_QUIET_EN &
-		~RTL_8201F_PG4_EEE_NWAY_EN &
-		~RTL_8201F_PG4_EEE_10M_CAP;
+	reg &= ~(RTL_8201F_PG4_EEE_RX_QUIET_EN |
+		 RTL_8201F_PG4_EEE_TX_QUIET_EN |
+		 RTL_8201F_PG4_EEE_NWAY_EN |
+		 RTL_8201F_PG4_EEE_10M_CAP);
 	err = phy_write(phydev, RTL_8201F_PG4_EEE_REG, reg);

486-491: Remove redundant 16-bit mask.

Line 489 applies & 0xffff to a PHY register read result, but phy_read() already returns a 16-bit value. This mask is redundant.

Apply this diff:

 		if (!(reg & RTL_8201F_PG7_RMSR_CLK_DIR_IN)) {
 			/* disable powersave if phy's clock output is used */
 			reg = phy_read(phydev, RTL_8201F_PG0_PSMR_REG);
-			reg &= ~RTL_8201F_PG0_PSMR_PWRSVE_EN & 0xffff;
+			reg &= ~RTL_8201F_PG0_PSMR_PWRSVE_EN;
 			err = phy_write(phydev, RTL_8201F_PG0_PSMR_REG, reg);
 		}

541-549: Simplify complex conditional logic for readability.

The nested conditional at lines 542-548 is difficult to parse. The logic combines phy_flag checks, tmdsclock thresholds, and version checks in a single compound condition.

Consider refactoring for clarity:

 	for (; cfg->tmdsclock != 0; cfg++) {
-		if (((!inno->phy_flag || tmdsclock > 33750000)
-		     && tmdsclock <= cfg->tmdsclock
-		     && cfg->version & inno->chip_version) ||
-		    (inno->phy_flag && tmdsclock <= 33750000
-		     && cfg->version & 4))
+		bool low_freq_special = (inno->phy_flag && 
+					 tmdsclock <= 33750000 &&
+					 cfg->version & 4);
+		bool normal_match = ((!inno->phy_flag || tmdsclock > 33750000) &&
+				     tmdsclock <= cfg->tmdsclock &&
+				     cfg->version & inno->chip_version);
+		
+		if (low_freq_special || normal_match)
 			break;
+	}

542-548: Replace magic number with named constant.

Line 547 uses the magic number 4 for a version check. This should be defined as a named constant for clarity.

Define a constant near the chip version definitions and use it:

#define INNO_HDMI_PHY_VERSION_RK3228_LOW_FREQ 4

Then use it in the conditional:

-		    (inno->phy_flag && tmdsclock <= 33750000
-		     && cfg->version & 4))
+		    (inno->phy_flag && tmdsclock <= 33750000 &&
+		     cfg->version & INNO_HDMI_PHY_VERSION_RK3228_LOW_FREQ))

588-588: Consider reducing log level for phy_flag information.

The phy_flag value is logged at dev_info level, which will always appear in kernel logs. Unless this information is critical for debugging production issues, consider using dev_dbg instead to reduce log noise.

-	dev_info(inno->dev, "phy_flag is: %d\n", inno->phy_flag);
+	dev_dbg(inno->dev, "phy_flag is: %d\n", inno->phy_flag);

665-666: Remove extra blank line.

There's an unnecessary extra blank line at line 666.

Apply this diff:

 		if (!parent_pd->is_ignore_pwr)
 			child_pd->is_ignore_pwr = false;
-
 
 		rockchip_pm_add_subdomain(pmu, np);

1-672: Consider splitting this monolithic patch for better maintainability.

This patch combines changes across 5 distinct subsystems:

  1. Device tree updates (crypto, MMC, pinctrl, GPU OPP)
  2. Clock tree restructuring
  3. Ethernet PHY fixup for RTL8201F
  4. HDMI PHY efuse flag handling
  5. PM domain ignore-power mechanism

While I understand from the learnings that Armbian prioritizes patch consistency, combining unrelated changes makes it difficult to:

  • Review each change on its technical merits
  • Debug hardware-specific issues (e.g., MMC timing vs PHY problems)
  • Selectively revert if one change causes issues
  • Understand the git history

Consider splitting into logical patches:

  1. rockchip-rk3228-clock-tree-rework.patch - Clock driver changes
  2. rockchip-arc-emac-rtl8201f-phy-fixup.patch - Ethernet PHY support
  3. rockchip-inno-hdmi-phy-efuse-flag.patch - HDMI PHY enhancements
  4. rockchip-pm-domain-ignore-power.patch - PM domain improvements
  5. rockchip-rk322x-dt-updates.patch - Device tree updates

This would align with standard kernel development practices while maintaining Armbian's consistency goals within each logical subsystem.

patch/kernel/archive/rockchip-6.12/patches.armbian/bt-broadcom-serdev-workaround.patch (1)

19-20: Consider C-style comment for kernel code consistency.

While C++ style comments (//) are supported in modern kernel code, C-style comments (/* */) are more traditional for kernel patches. Consider changing line 20 to use C-style commenting:

-			//set_bit(HCI_QUIRK_INVALID_BDADDR, &hdev->quirks);
+			/* set_bit(HCI_QUIRK_INVALID_BDADDR, &hdev->quirks); */

This is a minor style consistency suggestion and not a functional issue.

patch/kernel/archive/rockchip-6.12/patches.armbian/mmc-tinkerboard-sdmmc-reboot-fix.patch (1)

65-78: Drop stray printk noise

printk(KERN_ERR "Meow.\n"); / printk(KERN_ERR "woeM.\n"); look like debug leftovers and will spam logs on every reboot. Please replace them with meaningful messages or remove them entirely.

patch/kernel/archive/rockchip-6.12/patches.armbian/drm-rockchip-hardware-cursor.patch (2)

20-59: Remove unnecessary blank lines.

Lines 23 and 59 contain unnecessary blank lines that don't improve readability.

Apply this diff:

 static void vop_cursor_atomic_update(struct drm_plane *plane,
 		struct drm_atomic_state *state)
 {
-
 	struct drm_plane_state *new_state = drm_atomic_get_new_plane_state(state,
 									   plane);

And:

 	obj = fb->obj[0];
 	rk_obj = to_rockchip_obj(obj);
-
-
 	dsp_stx = dest->x1 + crtc->mode.htotal - crtc->mode.hsync_start;

260-261: Remove unnecessary blank line.

The blank line before the hwc_size field is unnecessary.

Apply this diff:

 	struct vop_reg channel;
-
 	struct vop_reg hwc_size;

Comment on lines 31 to 33
ddc-i2c-bus = <&i2c5>;
status = "okay";
pinctrl-names = "default";
--
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

Do not drop the HDMI status override.

Removing status = "okay"; reverts &hdmi to its SoC-default (disabled in rk3288.dtsi), which will kill HDMI output on MiQi. Keep the status property alongside the new pinctrl addition.

 &hdmi {
 	ddc-i2c-bus = <&i2c5>;
+	status = "okay";
 	pinctrl-names = "default";
 };
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
ddc-i2c-bus = <&i2c5>;
status = "okay";
pinctrl-names = "default";
--
&hdmi {
ddc-i2c-bus = <&i2c5>;
status = "okay";
pinctrl-names = "default";
};
🤖 Prompt for AI Agents
In patch/kernel/archive/rockchip-6.12/patches.armbian/dts-miqi-mali-gpu.patch
around lines 31 to 33, the change removed the HDMI node's explicit status
property which causes the node to fall back to the SoC default (disabled) and
disable HDMI on MiQi; restore a explicit status = "okay"; line alongside the new
ddc-i2c-bus / pinctrl-names additions so the &hdmi node remains enabled while
keeping the new pinctrl configuration.

Comment on lines 142 to 147
diff --git a/drivers/net/wireless/ssv6051/Makefile.bak b/drivers/net/wireless/ssv6051/Makefile.bak
new file mode 100644
index 000000000000..2733fa4dd3b7
index 000000000000..111111111111
--- /dev/null
+++ b/drivers/net/wireless/ssv6051/Makefile.bak
@@ -0,0 +1,107 @@
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Remove Makefile.bak—backup files should not be committed to version control.

The patch includes Makefile.bak (hunk 5), which is a backup artifact. Remove this file before merging.

-diff --git a/drivers/net/wireless/ssv6051/Makefile.bak b/drivers/net/wireless/ssv6051/Makefile.bak
-new file mode 100644
-index 000000000000..111111111111
---- /dev/null
-+++ b/drivers/net/wireless/ssv6051/Makefile.bak
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
diff --git a/drivers/net/wireless/ssv6051/Makefile.bak b/drivers/net/wireless/ssv6051/Makefile.bak
new file mode 100644
index 000000000000..2733fa4dd3b7
index 000000000000..111111111111
--- /dev/null
+++ b/drivers/net/wireless/ssv6051/Makefile.bak
@@ -0,0 +1,107 @@
🤖 Prompt for AI Agents
In patch/kernel/archive/rockchip-6.12/patches.armbian/wifi-driver-ssv6051.patch
around lines 142-147, the patch adds a backup file
drivers/net/wireless/ssv6051/Makefile.bak which should not be committed; remove
the Makefile.bak entry from the patch (or delete the file and regenerate the
patch) so the backup is excluded and re-create the patch without that file
included.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

11 Milestone: Fourth quarter release Hardware Hardware related like kernel, U-Boot, ... Needs review Seeking for review Patches Patches related to kernel, U-Boot, ... size/large PR with 250 lines or more

Development

Successfully merging this pull request may close these issues.

1 participant